<template>
  <span>
    <el-popover
      v-if="currentData != beforeData"
      placement="top-start"
      width="200"
      trigger="hover"
      :content="beforeData?String(beforeData):''"
    >
    <el-tag slot="reference" type="danger">{{ currentData }}</el-tag>
    </el-popover>
    <span v-else>
      {{ currentData }}
    </span>
  </span>

</template>

<script>
export default {
  name: 'Compare',
  props: {
    currentData: [String, Number],
    beforeData: [String, Number],
    flag: {
      type: Boolean,
      default: true
    }
  }
}
</script>

<style scoped>

</style>
